<?php 
class InventoryUtil{
	public static function isPartExist($partno){
		$count = Yii::app()
			->db
			->createCommand('select count(*) from tbl_inventory where partno=:partno')
			->bindValues(array('partno'=>$partno))
			->queryScalar();
		if($count > 0){
			return true;
		}
		return false;
	}
}